﻿<UserControl x:Class="SoftTeach.View.Wochenpläne.TerminplaneintragDetailView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="200">
  <Border Background="{Binding Path=TerminplaneintragBackground}" CornerRadius="3">
    <Border.Triggers>
      <EventTrigger RoutedEvent="UIElement.MouseEnter">
        <BeginStoryboard>
          <Storyboard>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                             Storyboard.TargetName="EditButtons" Storyboard.TargetProperty="(UIElement.Visibility)">
              <DiscreteObjectKeyFrame KeyTime="00:00:00">
                <DiscreteObjectKeyFrame.Value>
                  <Visibility>Visible</Visibility>
                </DiscreteObjectKeyFrame.Value>
              </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
          </Storyboard>
        </BeginStoryboard>
      </EventTrigger>
      <EventTrigger RoutedEvent="UIElement.MouseLeave">
        <BeginStoryboard>
          <Storyboard>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                             Storyboard.TargetName="EditButtons" Storyboard.TargetProperty="(UIElement.Visibility)">
              <DiscreteObjectKeyFrame KeyTime="00:00:00">
                <DiscreteObjectKeyFrame.Value>
                  <Visibility>Hidden</Visibility>
                </DiscreteObjectKeyFrame.Value>
              </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
          </Storyboard>
        </BeginStoryboard>
      </EventTrigger>
    </Border.Triggers>
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" MinHeight="20"/>
        <RowDefinition Height="*" MinHeight="20"/>
      </Grid.RowDefinitions>
      <Label Grid.Row="0" Grid.Column="0" Padding="5,0,5,0" VerticalAlignment="Center" 
               Content="{Binding Path=TerminplaneintragKlasse}"/>
      <Border Grid.Row="0" Grid.Column="0" Style="{StaticResource DisplayStyle}" HorizontalAlignment="Right">
        <StackPanel Orientation="Horizontal">
          <StackPanel Orientation="Horizontal" Visibility="Hidden" HorizontalAlignment="Right" 
                      x:Name="EditButtons">
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Command="{Binding Path=EditTerminplaneintragCommand}">
              <Image Source="/SoftTeach;component/Images/Edit16.png"/>
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Command="{Binding Path=RemoveTerminplaneintragCommand}">
              <Image Source="/SoftTeach;component/Images/Remove16.png"/>
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Command="{Binding Path=AddNotenCommand}">
              <Image Source="/SoftTeach;component/Images/Note16.png"/>
            </Button>
          </StackPanel>
          <Button Command="{Binding Path=ProofTerminplaneintragCommand}" 
                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
            <Image Source="{Binding Path=ProofImage}"/>
          </Button>
        </StackPanel>
      </Border>
      <Label Grid.Row="1" Padding="5,0,5,5" 
               VerticalAlignment="Bottom"  
               HorizontalAlignment="Right"
               Content="{Binding Path=TerminplaneintragOrt}"/>
      <TextBlock Grid.Row="1" Padding="5,0,5,0" VerticalAlignment="Top"  
               Text="{Binding Path=TerminplaneintragThema}" TextWrapping="Wrap"/>
    </Grid>
  </Border>
</UserControl>
